#include <cstdio>

struct Complex {
	double a, b;
	Complex(): a(0), b(0) { }
	Complex(double a, double b): a(a), b(b) { }
};

void complex_add(Complex *lhs, Complex *rhs, Complex *result) {
	result->a = lhs->a + rhs->a;
	result->b = lhs->b + rhs->b;
}

void complex_sub(Complex *lhs, Complex *rhs, Complex *result) {
	result->a = lhs->a - rhs->a;
	result->b = lhs->b - rhs->b;
}

void complex_mul(Complex *lhs, Complex *rhs, Complex *result) {
	result->a = lhs->a*rhs->a - lhs->b*rhs->b;
	result->b = lhs->b*rhs->a + lhs->a*rhs->b;
}

void complex_div(Complex *lhs, Complex *rhs, Complex *result) {
	result->a = (lhs->a*rhs->a + lhs->b*rhs->b) / (rhs->a*rhs->a + rhs->b*rhs->b);
	result->b = (lhs->b*rhs->a - lhs->a*rhs->b) / (rhs->a*rhs->a + rhs->b*rhs->b);
}


int main() {
	char op;
	double a, b, c, d;
	scanf("%c%lf%lf%lf%lf", &op, &a, &b, &c, &d);
	Complex c1, c2, result;
	c1 = Complex(a, b);
	c2 = Complex(c, d);
	switch (op) {
		case '+':
			complex_add(&c1, &c2, &result);
			break;
		case '-':
			complex_sub(&c1, &c2, &result);
			break;
		case '*':
			complex_mul(&c1, &c2, &result);
			break;
		case '/':
			complex_div(&c1, &c2, &result);
			break;
	}
	printf("%.2lf+%.2lfi", result.a, result.b);
	
	return 0;
}

